Order of Operations

The order in which an equation is performed. The order is (from top to bottom):
//Parenthesis
//Exponents
//Multiplication
//Division
//Modulus (only applies in programming)
//Addition
//Subtraction

A common mneumonic device to remember this is PEMDAS (PEMDMAS in programming)
An example in code:

public int orderOps(double x)
{
  x = (2 * 3 - 1) + 2/4
  return x;
 
  //Step 1: Parenthesis come first, so we look at whats in there
  //Step 2: Multiplication comes before subtraction, so we multiply 2*3, which equals 6
  //Step 3: Subtract 1 from 6 to get 5
  //Step 4: Division comes before addition, so divide 2 by 4 to get 0.5
  //Final Step: Add 5 and 0.5
  //Solution: x = 5.5
}